<?php
$this->breadcrumbs=array(
	'Portfolionames',
);

$portfoliolist = array();
$portnames = Portfolioname::model()->findAll("accountID = ".Yii::app()->user->id);

if(count($portnames) == 0) {
    $portfoliolist[] = array('label'=>'You have no Portfolio');
}

foreach ($portnames as $portname) {
    $portfoliolist[] = array('label'=>$portname->name, 'url'=>array('/portfolio/orderlog', "port"=>$portname->id));
}
$this->menu=array(
    array('label'=>'Portfolio List', 'items'=>$portfoliolist),
	array('label'=>'Create Portfolio', 'url'=>array('/portfolioname/create')),
);
?>

<h1>Portfolios</h1>

<?php $this->widget('zii.widgets.CListView', array(
	'dataProvider'=>$dataProvider,
	'itemView'=>'_view',
)); ?>
